I am new to domino so forgive me if this is a 'newbie' style question. I am looking for a way to access a file that has been run through the server and the only way that I have found to do this is similar to the code at the bottom. Is there a better way to get to the output without having to go through the localhost? Or is this just the standard way this type of thing is done and I should just live with it? It just seems kind of clunky to me.
Regards,
-Jason
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
URL url = new URL("
http://127.0.0.1/http_post_test.nsf/test_form?CreateDocument");
URLConnection connection = url.openConnection();
connection.setUseCaches(false);
connection.setDoOutput (true);
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line;
while(null != (line = in.readLine())) {
System.out.println(line);
}
in.close();
} catch(Exception e) {
e.printStackTrace();
}
}